<?php

namespace Fun\Jobeet\Model\Category;

/**
 * Category
 */
class Category
{
  /**
   * @var integer
   */
  private $id;

  /**
   * @var string
   */
  private $name;

  /**
   * @var \Doctrine\Common\Collections\Collection
   */
  private $jobs;

  /**
   * @var \Doctrine\Common\Collections\Collection
   */
  private $affiliates;

  /**
   * Constructor
   */
  public function __construct()
  {
    $this->jobs = new \Doctrine\Common\Collections\ArrayCollection();
    $this->affiliates = new \Doctrine\Common\Collections\ArrayCollection();
  }

  /**
   * Get id
   *
   * @return integer
   */
  public function getId()
  {
    return $this->id;
  }

  /**
   * Set name
   *
   * @param string $name
   *
   * @return Category
   */
  public function setName($name)
  {
    $this->name = $name;

    return $this;
  }

  /**
   * Get name
   *
   * @return string
   */
  public function getName()
  {
    return $this->name;
  }

  /**
   * Add job
   *
   * @param \Fun\Jobeet\Model\Job\Job $job
   *
   * @return Category
   */
  public function addJob(\Fun\Jobeet\Model\Job\Job $job)
  {
    $this->jobs[] = $job;

    return $this;
  }

  /**
   * Remove job
   *
   * @param \Fun\Jobeet\Model\Job\Job $job
   */
  public function removeJob(\Fun\Jobeet\Model\Job\Job $job)
  {
    $this->jobs->removeElement($job);
  }

  /**
   * Get jobs
   *
   * @return \Doctrine\Common\Collections\Collection
   */
  public function getJobs()
  {
    return $this->jobs;
  }

  /**
   * Add affiliate
   *
   * @param \Fun\Jobeet\Model\Affiliate\Affiliate $affiliate
   *
   * @return Category
   */
  public function addAffiliate(\Fun\Jobeet\Model\Affiliate\Affiliate $affiliate)
  {
    $this->affiliates[] = $affiliate;

    return $this;
  }

  /**
   * Remove affiliate
   *
   * @param \Fun\Jobeet\Model\Affiliate\Affiliate $affiliate
   */
  public function removeAffiliate(\Fun\Jobeet\Model\Affiliate\Affiliate $affiliate)
  {
    $this->affiliates->removeElement($affiliate);
  }

  /**
   * Get affiliates
   *
   * @return \Doctrine\Common\Collections\Collection
   */
  public function getAffiliates()
  {
    return $this->affiliates;
  }

}
